#ifndef NODE_HPP
#define NODE_HPP
#include <string>
#include <vector>
#include <map>

class Node
{
public:
    Node(std::string name);
    void addParrent(Node* parrent);
    void addChild(Node* child);
    void addProperty(std::string key, std::string value);
    void joinChild(Node* child);
    void joinParrent(Node* parrent);
    void setProperties(std::map < std::string, std::string > properties);
    std::string property(std::string key);
    int propertyAsInt(std::string key);
    std::map < std::string, std::string > properties();
    std::string name_;
    std::vector < Node* > parrents_;
    std::vector < Node* > childeren_;
    typedef std::map<std::string, std::string>::iterator prop_it;
private:
    std::map < std::string, std::string > properties_;
    void addChild_(Node* parrent);
    void addParrent_(Node* child);
};

#endif // NODE_HPP
